package br.ufrj.dcc.comp2.musica.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import br.ufrj.dcc.comp2.musica.controle.ControleCardLayout;

public class ListenerBotaoVoltar implements ActionListener {

	private String ultimoPainel;
	private ControleCardLayout cardLayout;
	
	public ListenerBotaoVoltar (ControleCardLayout cardLayout) {
		this.cardLayout = cardLayout;
		
	}
	public void actionPerformed(ActionEvent e) {
		
		ultimoPainel = cardLayout.getUltimoPainel();
		System.out.println(ultimoPainel);
		
				
		cardLayout.setCard(ultimoPainel);
	}

}
